﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.views {
    import net.wooga.pets.events.*;
    import net.wooga.pets.models.*;
    import net.wooga.pets.views.components.*;
    import org.robotlegs.mvcs.*;

    public class PointsDisplayMediator extends Mediator {

		[Inject]
        public var pointsDisplay:PointsDisplay;
		[Inject]
        public var userModel:UserModel;

        override public function onRegister():void{
            super.onRegister();
            eventMap.mapListener(eventDispatcher, UserModelEvent.ON_MODEL_CHANGED, this.onModelChanged);
            this.onModelChanged();
        }
        private function onModelChanged(_arg1:UserModelEvent=null):void{
            this.pointsDisplay.setCoins(this.userModel.coins);
        }

    }
}//package net.wooga.pets.views 
